<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>学生选课系统</title>
    <link href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <style type="text/css">
        *{
            margin:0;
            padding:0;
        }
        .div{
            margin-top:30px;
            width:100%;
            font-size:20px;
            text-align:center;
        }
        .title{
            width: 100%;
            height: 50px;
            line-height: 80px;
            text-align: center;
            font-size: 30px;
            font-family: kaiti;
        }
    </style>
</head>
<body>
<div style="width:805px;height: 700px; margin: 0 auto">
    <div class="title">
        <button class="btn btn-warning" style="position: relative;left: -260px" onclick="back()">返回</button>
        <b>学生本学期选课</b>
    </div>
    <div>
        <div class="div">
            <table class="table table-striped">
                <thead style="background-color: #87CEFA;opacity: 0.9">
                <tr>
                    <th>课程号(course_no)</th>
                    <th>课程名(course_name)</th>
                    <th>学分(course_score)</th>
                    <th>选课(course_selected)</th>
                </tr>
                </thead>
                <tbody>
                <c:forEach var="data" items="${course}" >
                    <tr>
                        <td>${data.course_no}</td>
                        <td>${data.course_name}</td>
                        <td>${data.course_socer}</td>
                        <td><button class="btn btn-info" onclick="select()">选课</button></td>
                    </tr>
                </c:forEach>
                </tbody>
            </table>
        </div>
    </div>
</div>
</body>
<script>
    var select = function(){
        window.location.href="course_select";
    }
    var msg="${msg}";
    if(msg!=null && msg!=""){
        alert(msg);
    }
    var back = function () {
        window.location.href="student_select";
    }
</script>
</html>

